#!/usr/bin/env groovy

def call() {
    script {
        sh'''
        if [ -f helm_id ]; then
            helm_hist_id=`cat helm_id`
            if [ "${helm_hist_id}" != "0" ]; then
              helm rollback ${app_name} -n ${namespace} ${helm_hist_id}
            else
              echo "回滚失败"
            fi
        fi
      '''
    }
}
